package com.robot.base.common.api;

import com.qihang.annotations.ApiFactory;
import com.robot.base.model.CheckOrderBean;
import com.robot.base.model.CollectDetailBean;
import com.robot.base.model.CouponBean;
import com.robot.base.model.CourseAllTypeBean;
import com.robot.base.model.CreateOrderBean;
import com.robot.base.model.PageListBean;
import com.robot.base.model.ShopCartBean;
import com.robot.base.model.WorksBean;
import com.robot.base.model.WorksHomeBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import com.robot.base.model.BaseResponse;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

@ApiFactory(value = GlBaseApi.class)
public interface ShopService {

    @POST("/app-api/app/infra/cart/create")
    Observable<BaseResponse<Object>> cartCreate(@Body Map<String, Object> map);

    @POST("/app-api/app/course/saveCollectCourse")
    Observable<BaseResponse<Object>> saveCollectCourse(@Body Map<String, Object> map);

    @GET("/app-api/app/infra/cart/page")
    Observable<BaseResponse<PageListBean<ShopCartBean>>> page(@QueryMap Map<String, Object> map);


    @POST("/app-api/app/infra/cart/deletes")
    Observable<BaseResponse<Object>> deletesCart(@Body Map<String, Object> map);


    @POST("/app-api/app/pay/createOrder")
    Observable<BaseResponse<String>> createOrder(@Body Map<String, Object> map);

    @POST("/app-api/app/pay/checkOrder")
    Observable<BaseResponse<CheckOrderBean>> checkOrder(@Body Map<String, Object> map);
    @POST("/app-api/app/pay/paySuccess")
    Observable<BaseResponse<Object>> paySuccess(@Body Map<String, Object> map);

    @POST("/app-api/app/infra/coupon/receive")
    Observable<BaseResponse<Object>> coupon(@Body Map<String, Object> map);

    @GET("/app-api/app/infra/coupon/page")
    Observable<BaseResponse<PageListBean<CouponBean>>> couponPage(@QueryMap Map<String, Object> map);

    @GET("/app-api/app/infra/coupon/userCouponPage")
    Observable<BaseResponse<PageListBean<CouponBean>>> userCouponPage(@QueryMap Map<String, Object> map);

    //新增作品接口
    @POST("/app-api/app/works/createWorks")
    Observable<BaseResponse<String>> createWorks(@Body Map<String, Object> map);

    //创建收藏夹
    @POST("/app-api/app/works/createCollect")
    Observable<BaseResponse<String>> createCollect(@Body Map<String, Observable> map);

    //关注收藏夹作品
    @POST("/app-api/app/works/followCollect")
    Observable<BaseResponse<String>> followCollect(@Body Map<String, Observable> map);

    //获得收藏夹信息
    @GET("/app-api/app/works/getCollectDetail")
    Observable<BaseResponse<CollectDetailBean>> getCollectDetail(@Query("id") String id);

    //分页获取收藏夹列表
    @GET("/app-api/app/works/collect-page")
    Observable<BaseResponse<PageListBean<CollectDetailBean>>> collectPage(@Body Map<String, Observable> map);

    //添加收藏夹作品
    @POST("/app-api/app/works/saveCollectWorks")
    Observable<BaseResponse<String>> saveCollectWorks(@Body Map<String, Observable> map);

    //热门收藏夹
    @POST("/app-api/app/works/hotCollect")
    Observable<BaseResponse<List<CollectDetailBean>>> hotCollect(@Body Map<String, Observable> map);
}
